package com.gmail.huxiaowi.cblog.dao.impl.jdo;

import java.util.Collection;

import com.gmail.huxiaowi.cblog.dao.IMessageDao;
import com.gmail.huxiaowi.cblog.entity.Article;
import com.gmail.huxiaowi.cblog.entity.Message;

/**
 * Class MessageDaoJDOImpl
 * 
 * @author  huxw
 * @version $Revision:1.0.0, $Date:2010-4-29 下午05:46:43$
 */
public class MessageDaoJDOImpl extends GenericDaoJDOImpl<Message> implements IMessageDao{

    /* (non-Javadoc)
     * @see com.gmail.huxiaowi.cblog.dao.MessageDao#queryByArticle(com.gmail.huxiaowi.cblog.entity.Article)
     */
    @SuppressWarnings("unchecked")
    public Collection<Message> queryByArticle(Article article) {
        // TODO Auto-generated method stub
        return super.jt.find("SELECT FROM com.gmail.huxiaowi.cblog.entity.Message WHERE articleId==:articleId", new Object[]{article.getId()});
    }

}
